package com.cheer.entity;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 积分明细
 *
 * @author cheer
 */
@Data
@TableName("oa_integral_detail")
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class OaIntegralDetailEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId
    private Integer id;
    /**
     *
     */
    private String type;
    /**
     *
     */
    private String itemsId;
    /**
     *
     */
    private Integer integral;
    /**
     *
     */
    private Integer status;
    /**
     *
     */
    private String openid;
    /**
     *
     */
    private String addTime;


    public OaIntegralDetailEntity( String type,
                                   String itemsId,
                                   Integer integral,
                                   Integer status,
                                   String openid ) {
        this.type = type;
        this.itemsId = itemsId;
        this.integral = integral;
        this.status = status;
        this.openid = openid;
        this.addTime = String.valueOf(DateUtil.currentSeconds());
    }
}
